package com.lxy.u4day04.controller;

import com.lxy.u4day04.entity.User;
import com.lxy.u4day04.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("getUser")
    public List<User> getUser(){
        List<User> user = userService.findUser();
        return user;
    }
}
